package com.rybbaby.tss.platform.sysAdminUserJoinSysRole.service.imp;

import com.rybbaby.tss.core.web.service.imp.BaseServiceImp;
import com.rybbaby.tss.platform.sysAdminUserJoinSysRole.entity.SysAdminUserJoinSysRole;
import com.rybbaby.tss.platform.sysAdminUserJoinSysRole.service.ISysAdminUserJoinSysRoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @description 管理员拥有的角色数据库操作服务实现
 * 
 * @author 谢进伟
 * 
 * @createDate 2016-11-23 下午10:27:39
 */
@Service
@Transactional
public class SysAdminUserJoinSysRoleServiceImp extends BaseServiceImp<SysAdminUserJoinSysRole> implements ISysAdminUserJoinSysRoleService {

	@Override
	public List<Map<String , Object>> adminUserIdDatasource(){
		String sql1 = "SELECT id,username FROM sys_admin_user";
		List<Map<String , Object>> adminUserId_datasources = this.findForJdbc(sql1 , null);
		return adminUserId_datasources;
	}
	
	@Override
	public List<Map<String , Object>> roleIdDatasource(){
		String sql2 = "SELECT id,rolename FROM sys_role";
		List<Map<String , Object>> roleId_datasources = this.findForJdbc(sql2 , null);
		return roleId_datasources;
	}
	
	
}
